#ifndef _MACHINE_H
#define _MACHINE_H

#include <compiler.h>

struct machine_desc {
	const char *name;
	void *priv;
	void (*init_machine)(void);
};

#define MACHINE_START(_name)												\
	struct machine_desc __machine_desc_##_name								\
		__always_unused __aligned(4) __section(.__machine_descs) = {		\
			.name = #_name,

#define MACHINE_END \
};

extern struct machine_desc __machine_descs_start[], __machine_descs_end[];

#define for_each_machine_desc(p)											\
	for (p = __machine_descs_start; p < __machine_descs_end; p++)		

struct machine_desc *machine_lookup(void);

#endif /* _MACHINE_H */

